<template>
  <div class="app-wrapper">
    <router-view />
  </div>
</template>

<script>
  export default {
    name: 'App',
    watch:{
      '$store.state.app.currentTheme':{
        handler: function (val){
          window.document.documentElement.setAttribute( "data-theme", val );
        },
        immediate:true
      }
    },
    mounted(){
      if(!this.isEmpty(sessionStorage.getItem('currentTheme'))){
        this.$store.commit('app/TOGGLE_THEME',sessionStorage.getItem('currentTheme'));
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" >
  @import "./assets/styles/base_style.scss";
  .app-wrapper {
    height: 100%;
    @include bg_color("background-color-base");
  }

  * {
    margin: 0;
    padding: 0;
  }
</style>
